import React from 'react';
import { Switch, Route } from "react-router-dom";
import ListPage from './StudentList';
import EditPage from './StudentEdit';
import ViewPage from './StudentView';
import IntegralPage from './StudentIntegralEdit';

export const Region = {
  text: '学生',
};

const StudentComp = ({match}) => (
  <Switch>
    <Route path={`${match.url}/list`} component={ListPage} />
    <Route path={`${match.url}/edit/:id`} component={EditPage} />
    <Route path={`${match.url}/view/:id`} component={ViewPage} />
    <Route path={`${match.url}/add`} component={EditPage} />
    <Route path={`${match.url}/integral/:id`} component={IntegralPage} />
  </Switch>
);

export default StudentComp;